Skip to content

Harden protected-branch hooks for VS Code terminal Codex sessions#10

Merged
NagyVikt merged 1 commit intomainfrom
agent/fix-protected-branch-context-20260411
Apr 11, 2026
Merged

Harden protected-branch hooks for VS Code terminal Codex sessions#10
NagyVikt merged 1 commit intomainfrom
agent/fix-protected-branch-context-20260411

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary\n- tighten protected-branch VS Code detection in pre-commit/pre-push hooks\n- allow only VS Code Source Control hook envs (VSCODE_GIT_* / VSCODE_IPC_HOOK_CLI)\n- add regression tests proving TERM_PROGRAM=vscode alone is blocked\n\n## Verification\n- npm test

…eguards

This rebases the old protected-branch PR on top of current main and keeps only the still-useful delta: template pre-push guardrails plus branch-finish PR fallback modes. The AGENTS template line is updated so generated guidance matches the actual finish behavior.

Constraint: Keep current main hook policy intact while making legacy PR branch mergeable

Rejected: Merge old branch content wholesale | reintroduced stale protections and broke current tests

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep AGENTS template text synchronized with actual script behavior when finish-flow options change

Tested: npm test (41/41 pass)

Not-tested: live GitHub protected-base merge under required-review policy
@NagyVikt NagyVikt force-pushed the agent/fix-protected-branch-context-20260411 branch from 4789d27 to 9ef7188 Compare April 11, 2026 11:18
@NagyVikt NagyVikt merged commit 16d3d45 into main Apr 11, 2026
7 checks passed
@NagyVikt NagyVikt deleted the agent/fix-protected-branch-context-20260411 branch April 20, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant